#ifndef __ELEMENTCOMPONENT__
#define __ELEMENTCOMPONENT__

#include "../includes/includes.h"

#include "ImageHolder.h"

#include "../elements/DockElement.h"

class ContainerComponent;

class ElementComponent : public Component
{
public:
    //==============================================================================
    ElementComponent (ContainerComponent * owner_, DockElement * delem);
    ~ElementComponent();

	ImageHolder * getImageHolder();

	String getTexttoShow();

	ContainerComponent * getParentContainer();
	ContainerComponent * getChildContainer();

    void paint (Graphics& g);
    void resized();

	void mouseEnter(const MouseEvent& e);
	void mouseExit(const MouseEvent& e);

	void mouseMove(const MouseEvent& e);

	void mouseDrag(const MouseEvent &e);
	void mouseDown(const MouseEvent &e);
	void mouseUp(const MouseEvent &e);

	DockElement * getDockElement();
    //==============================================================================
    juce_UseDebuggingNewOperator

private:
	bool mouseIn;

	DockElement * dockElement;

	ContainerComponent * owner;

	ContainerComponent * childContainer; // just if this element belong to a ContainerElement

	ImageHolder * imageHolder;

	String textToShow;

    //==============================================================================
    // (prevent copy constructor and operator= being generated..)
    ElementComponent (const ElementComponent&);
    const ElementComponent& operator= (const ElementComponent&);
};


#endif   // __ElementHolder__
